Skip to content

fix: add rootDir to generated tsconfig for TypeScript 6 compat - #36

Merged
jxom merged 5 commits into
mainfrom
fix/ts6-rootdir
Apr 9, 2026
Merged

jxom merged 5 commits into
mainfrom
fix/ts6-rootdir

Conversation

@jxom

@jxom jxom commented Apr 9, 2026

Copy link
Copy Markdown
Member

TypeScript 6 requires rootDir to be explicitly set when it can infer the common source directory. The generated tsconfig.tmp.json was missing this, causing:

error TS5011: The common source directory of 'tsconfig.tmp.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.

Preserves user's rootDir if set in their tsconfig, otherwise defaults to '.'.

TS 6 requires rootDir to be explicitly set when it can infer the
common source directory. The generated tsconfig.tmp.json was missing
this, causing: 'The rootDir setting must be explicitly set'.

Preserves user's rootDir if set, otherwise defaults to '.'.

Amp-Thread-ID: https://ampcode.com/threads/T-019d70c8-e64b-704b-8e07-492aa2fffb55
@pkg-pr-new

pkg-pr-new Bot commented Apr 9, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/zile@36

commit: 0fc8c2b

@jxom
jxom merged commit df6abe3 into main Apr 9, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant